Skip to content

[release-4.21] OCPBUGS-77504: fix wavelength zone name regex#10343

Merged
openshift-merge-bot[bot] merged 2 commits intoopenshift:release-4.21from
openshift-cherrypick-robot:cherry-pick-10338-to-release-4.21
Mar 9, 2026
Merged

[release-4.21] OCPBUGS-77504: fix wavelength zone name regex#10343
openshift-merge-bot[bot] merged 2 commits intoopenshift:release-4.21from
openshift-cherrypick-robot:cherry-pick-10338-to-release-4.21

Conversation

@openshift-cherrypick-robot

This is an automated cherry-pick of #10338

/assign tthvo

tthvo and others added 2 commits February 28, 2026 20:28
The correct regex should check for segment "-wlz", which is common for
all "known" wavelength zones.

One example where the old regex "wl\d\-.*$" would fail is us-east-1-foe-wlz-1a.
Add comprehensive test coverage for OCPBUGS-77355 fix that updates
the Wavelength Zone detection regex from 'wl\d\-.*$' to '-wlz.*$'.

Test cases added:
- Test traditional format WL zones (us-west-2-wl1-sea-wlz-1)
- Test new format WL zones (us-east-1-foe-wlz-1a) - PRIMARY FIX
- Test mixed traditional and new format zones
- Test only new format zones

The new regex correctly identifies all Wavelength Zone formats that
contain the '-wlz' segment, including the new format zones that were
previously not recognized by the old 'wl\d\-' pattern.
@openshift-ci-robot
Copy link
Contributor

@openshift-cherrypick-robot: Jira Issue OCPBUGS-77355 has been cloned as Jira Issue OCPBUGS-77504. Will retitle bug to link to clone.
/retitle [release-4.21] OCPBUGS-77504: fix wavelength zone name regex

Details

In response to this:

This is an automated cherry-pick of #10338

/assign tthvo

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot changed the title [release-4.21] OCPBUGS-77355: fix wavelength zone name regex [release-4.21] OCPBUGS-77504: fix wavelength zone name regex Feb 28, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Feb 28, 2026
@openshift-ci-robot
Copy link
Contributor

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-77504, which is invalid:

  • expected dependent Jira Issue OCPBUGS-77355 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is MODIFIED instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

This is an automated cherry-pick of #10338

/assign tthvo

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Copy link
Member

@tthvo tthvo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 2, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 2, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tthvo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 2, 2026
@gpei
Copy link
Contributor

gpei commented Mar 3, 2026

/jira cc-qa

@openshift-ci-robot
Copy link
Contributor

@gpei: This pull request references Jira Issue OCPBUGS-77504, which is invalid:

  • expected dependent Jira Issue OCPBUGS-77355 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ON_QA instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira cc-qa

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@gpei
Copy link
Contributor

gpei commented Mar 3, 2026

cc @liweinan

@tthvo
Copy link
Member

tthvo commented Mar 3, 2026

/cherry-pick release-4.20

@openshift-cherrypick-robot
Copy link
Author

@tthvo: once the present PR merges, I will cherry-pick it on top of release-4.20 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-4.20

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@tthvo
Copy link
Member

tthvo commented Mar 3, 2026

/cc @patrickdillon

@openshift-ci openshift-ci bot requested a review from patrickdillon March 3, 2026 02:48
@tthvo
Copy link
Member

tthvo commented Mar 3, 2026

/test e2e-aws-ovn-edge-zones

@liweinan
Copy link
Contributor

liweinan commented Mar 3, 2026

Upstream: #10338

@liweinan
Copy link
Contributor

liweinan commented Mar 3, 2026

OCPBUGS-77504 Verification Report: PR #10343 (4.21 Backport)

Test Date: 2026-03-03
Test Method: Permissions Policy Generation + Unit Tests
Result: ✅ PASSED


Test Environment

Installer Version:

$ ./bin/openshift-install version
./bin/openshift-install v1.4.21-rc2-26-geb7fe6262cb57b59e6df1a20a6acb2ef6c1a0c05
built from commit eb7fe6262cb57b59e6df1a20a6acb2ef6c1a0c05
release image registry.ci.openshift.org/origin/release:4.21

Branch: pr-10343 (cherry-pick from #10338)


Test Procedure

1. Build Installer

git fetch origin pull/10343/head:pr-10343
git checkout pr-10343
SKIP_TERRAFORM=y hack/build.sh

2. Run Unit Tests

$ go test -v ./pkg/asset/installconfig/aws -run TestIncludesWavelengthZones
=== RUN   TestIncludesWavelengthZones
=== RUN   TestIncludesWavelengthZones/Should_be_true_when_edge_compute_specified_with_WL_zones/with_common_wavelength_zone_format
=== RUN   TestIncludesWavelengthZones/Should_be_true_when_edge_compute_specified_with_WL_zones/with_irregular_wavelength_zone_format
=== RUN   TestIncludesWavelengthZones/Should_be_false_when/edge_compute_specified_without_WL_zones
=== RUN   TestIncludesWavelengthZones/Should_be_false_when/edge_compute_not_specified
--- PASS: TestIncludesWavelengthZones (0.00s)
PASS
ok  	github.com/openshift/installer/pkg/asset/installconfig/aws	1.815s

✅ All unit tests passed

3. Generate Permissions Policy

Install config (using new WL Zone format us-east-1-foe-wlz-1a):

compute:
- name: edge
  platform:
    aws:
      zones:
      - us-east-1-foe-wlz-1a  # New format

Command:

./bin/openshift-install create permissions-policy --dir /tmp/test-pr-10343

Output:

level=info msg=Credentials loaded from the "default" profile in file "/Users/weli/.aws/credentials"
level=info msg=Consuming Install Config from target directory
level=info msg=Permissions-Policy created in: /tmp/test-pr-10343

4. Verify Carrier Gateway Permissions

$ jq '.Statement[] | select(.Sid == "PermissionCreateCarrierGateway")' \
    /tmp/test-pr-10343/aws-permissions-policy-creds.json
{
  "Sid": "PermissionCreateCarrierGateway",
  "Effect": "Allow",
  "Action": [
    "ec2:DescribeCarrierGateways",
    "ec2:CreateCarrierGateway",
    "ec2:DeleteCarrierGateway"
  ],
  "Resource": [
    "*"
  ]
}

✅ Carrier Gateway permissions present in generated policy

$ jq '.Statement | length' /tmp/test-pr-10343/aws-permissions-policy-creds.json
12

Test Results

Test Item Status Details
Unit tests ✅ PASS New format WL Zone correctly identified
Policy generation ✅ PASS Policy file created successfully
CAGW permissions ✅ PASS All 3 permissions included
Statement count ✅ PASS 12 statements (includes PermissionCreateCarrierGateway)

Conclusion

PR #10343 successfully backports the Wavelength Zone fix to 4.21

  • New format Wavelength Zone (us-east-1-foe-wlz-1a) is correctly recognized
  • Generated IAM policy includes required Carrier Gateway permissions
  • Unit tests confirm regex pattern fix works as expected

Verified by: @liweinan
Related PRs:

@liweinan
Copy link
Contributor

liweinan commented Mar 3, 2026

/verified by liweinan

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 3, 2026
@openshift-ci-robot
Copy link
Contributor

@liweinan: This PR has been marked as verified by liweinan.

Details

In response to this:

/verified by liweinan

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@patrickdillon
Copy link
Contributor

/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Mar 9, 2026
@tthvo
Copy link
Member

tthvo commented Mar 9, 2026

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 9, 2026
@openshift-ci-robot
Copy link
Contributor

@tthvo: This pull request references Jira Issue OCPBUGS-77504, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.z) matches configured target version for branch (4.21.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note type set to "Release Note Not Required"
  • dependent bug Jira Issue OCPBUGS-77355 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-77355 targets the "4.22.0" version, which is one of the valid target versions: 4.22.0
  • bug has dependents

Requesting review from QA contact:
/cc @liweinan

Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from liweinan March 9, 2026 19:40
@tthvo
Copy link
Member

tthvo commented Mar 9, 2026

/retest
/tide refresh

@openshift-merge-bot openshift-merge-bot bot merged commit 6ad9e87 into openshift:release-4.21 Mar 9, 2026
25 of 26 checks passed
@openshift-ci-robot
Copy link
Contributor

@openshift-cherrypick-robot: Jira Issue Verification Checks: Jira Issue OCPBUGS-77504
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-77504 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

This is an automated cherry-pick of #10338

/assign tthvo

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-cherrypick-robot
Copy link
Author

@tthvo: new pull request created: #10373

Details

In response to this:

/cherry-pick release-4.20

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.21.0-0.nightly-2026-03-11-185944

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants